﻿@model IEnumerable<Yglab.Models.User>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/LAYOUT.cshtml";
}

<h2>Kullanıcı Yönet</h2>

<p>
    @Html.ActionLink("Yeni Kullanıcı Oluştur", "Create")
</p>
<table class="gridtable">
    <tr>
        <th>
            @Html.DisplayName("İsim")
        </th>
        <th>
            @Html.DisplayName("Soy İsim")
        </th>
        <th>
             @Html.DisplayName("Eposta")
        </th>
        <th>
            @Html.DisplayName("Şifre")
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Surname)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Password)
        </td>
        <td>
            @Html.ActionLink("Düzenle", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Ayrıntılar", "Details", new { id=item.Id }) |
            @Html.ActionLink("Sil", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
